qx.Class.define("caraffa.forms.ChartPacientesOSAnio",
{
	extend : qx.ui.form.ow.FormTab,

	construct : function ()
	{
		this.base(arguments, "ChartPacientesOSAnio", "Est: OS. Pac. x año");
		
		this._grpChart = new qx.ui.groupbox.GroupBox();
  		this._grpChart.setWidth(800);
  		this._grpChart.setLayout(new qx.ui.layout.Basic());
		
		this._cmbFecha = new qx.ui.form.ow.ComboBox("Año a Mostrar:", [{value:"2012"}, {value:"2011", select:true}, {value:"2010"}], true);
		this._imgChartPOA = new qx.ui.basic.Image("");
		
		this._grpChart.add(this._cmbFecha, {left:0, top:0});
		this._grpChart.add(this._imgChartPOA, {left:0, top:50});

		this._attachEvents();
		
		this.add(this._grpChart, {left:10, top:10});
		
		this._imgChartPOA.setSource("reports/ChartPacientesOSAnio.php?anio=" + this._cmbFecha.getValue());
	},
	members :
	{
		_attachEvents : function ()
		{
			this._cmbFecha.addListener("changeValue", function ()
			{
				this._imgChartPOA.setSource("reports/ChartPacientesOSAnio.php?anio=" + this._cmbFecha.getValue());
			}, this);
		}
	}
});
